package com.laoluo.erp.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.laoluo.erp.dao.OrdersLogDAO;
import com.laoluo.erp.domain.OrdersLog;
import com.laoluo.erp.service.OrdersLogService;
import com.laoluo.erp.util.PageListData;

@Service
public class OrdersLogServiceImpl implements OrdersLogService {

	private OrdersLogDAO dao;

	@Resource(name="ordersLogDAOImpl")
	public void setDao(OrdersLogDAO dao){
		this.dao = dao;
	}

	public void save(OrdersLog ordersLog){
		dao.save(ordersLog);
	}

	public void delete(OrdersLog ordersLog){
		dao.delete(ordersLog);
	}

	public void delete(Integer id) {
		dao.delete(OrdersLog.class,id);
	}

	public void update(OrdersLog ordersLog){
		dao.update(ordersLog);
	}

	public OrdersLog findById(Integer id) {
		return dao.findById(OrdersLog.class, id);
	}

	public List<OrdersLog> findAll() {
		return dao.findAll(OrdersLog.class);
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public PageListData queryPage(Map param, int start, int limit,int page) {
		param.put("start", start); 
		param.put("limit", limit);
		return dao.queryPage(OrdersLog.class, param, start,limit,page);

	}
}
